package com.park.service.impl.user;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.client.model.user.UserAttentionModel;
import com.park.client.service.user.UserAttentionService;
import com.park.dao.user.UserAttentionMapper;
import com.park.service.impl.base.BaseServiceImpl;

@Service("userAttentionService")
public class UserAttentionServiceImpl extends BaseServiceImpl<UserAttentionModel> implements UserAttentionService {

	@Autowired
	private UserAttentionMapper userAttentionMapper;

	@Override
	public boolean deleteByPrimaryKey(Long id) {
		return userAttentionMapper.deleteByPrimaryKey(id) == 1;
	}

	@Override
	public boolean insertSelective(UserAttentionModel record) {
		return userAttentionMapper.insertSelective(record) == 1;
	}

	@Override
	public UserAttentionModel selectByPrimaryKey(Long id) {
		return userAttentionMapper.selectByPrimaryKey(id);
	}

	@Override
	public boolean updateByPrimaryKeySelective(UserAttentionModel record) {
		return userAttentionMapper.updateByPrimaryKeySelective(record) == 1;
	}

	@Override
	public boolean updateByPrimaryKey(UserAttentionModel record) {
		return userAttentionMapper.updateByPrimaryKey(record) == 1;
	}

	@Override
	public boolean insert(UserAttentionModel record) {
		return userAttentionMapper.insert(record) == 1;
	}

	@Override
	public List<UserAttentionModel> selectAllAttentions(UserAttentionModel userAttention) {
		return userAttentionMapper.selectAllAttentions(userAttention);
	}

	@Override
	public boolean cancelAttention(Map<String, Object> map) {
		return userAttentionMapper.cancelAttention(map) == 1;
	}

	@Override
	public UserAttentionModel selectHasExists(UserAttentionModel userAttention) {
		return userAttentionMapper.selectHasExists(userAttention);
	}

}
